[SNOW-3249917] JDBC removal Step 11a: Replicate RestRequest and HTTP retry infrastructure#1142
Closed
sfc-gh-ggeng wants to merge 5 commits intojdbc-removal-step10c-remove-session-part2from
Closed
Conversation
Step 10c/10c2 done (remove SFSession). After those, 6 JDBC imports + ~70 FQN references remain. Split final cleanup into Step 11: - 11a: Create HttpRequestHelper, replace 6 JDBC HTTP calls - 11b: Remove 47 FQN SnowflakeSQLException from throws clauses - 11c: Clean up remaining FQN refs (HttpClientSettingsKey, HttpProtocol, OCSPMode, SnowflakeUtil, setSessionlessProxyForAzure, AwsSdkGCPSigner) - 11d: Demote JDBC to test scope + remove shade rules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…retry infrastructure Replicate the following JDBC classes (v3.25.1) verbatim into the ingest fileTransferAgent package: - ThrowingBiFunction (functional interface for retry callbacks) - OCSPErrorCode (OCSP error code enum) - SFOCSPException (OCSP exception) - URLUtil (URL validation and request ID extraction) - DecorrelatedJitterBackoff (already existed, now tracked) - RetryContext (retry state holder) - RetryContextManager (retry callback registration) - HttpExecutingContext (HTTP request execution state) - HttpExecutingContextBuilder (builder for HttpExecutingContext) - SnowflakeUseDPoPNonceException (DPoP nonce error) - RestRequest (1265-line HTTP request retry engine) Import swaps applied per the JDBC removal plan. HttpUtil references kept as FQN (net.snowflake.client.core.HttpUtil) pending future replication. SessionUtil.isNewRetryStrategyRequest kept as FQN. SnowflakeUtil.logResponseDetails inlined as a local method since it requires JDBC's SFLogger type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ap callers to replicated REST infrastructure Replicate JDBC's HttpUtil as JdbcHttpUtil (renamed to avoid collision with ingest's existing net.snowflake.ingest.utils.HttpUtil). Also replicate SnowflakeMutableProxyRoutePlanner and AttributeEnhancingHttpRequestRetryHandler as small helper classes. Key changes: - JdbcHttpUtil: verbatim replication of JDBC HttpUtil with import swaps. SFTrustManager replaced with null (ingest does not use OCSP trust manager). SFSSLConnectionSocketFactory -> IngestSSLConnectionSocketFactory. SystemUtil.convertSystemPropertyToIntValue inlined. SessionUtil.isNewRetryStrategyRequest inlined as static method. Deprecated S3 proxy wrapper methods omitted (S3HttpUtil callable directly). - RestRequest: all FQN net.snowflake.client.core.HttpUtil references replaced with JdbcHttpUtil. SessionUtil.isNewRetryStrategyRequest replaced with JdbcHttpUtil.isNewRetryStrategyRequest. - TelemetryClient: HttpUtil.executeGeneralRequest and HttpUtil.getSocketTimeout replaced with JdbcHttpUtil equivalents. SnowflakeSQLException import swapped to ingest's replicated version. - SnowflakeGCSClient: HttpUtil.getHttpClient, getHttpClientWithoutDecompression, getSocketTimeout replaced with JdbcHttpUtil equivalents. Added toIngestKey adapter to convert JDBC's HttpClientSettingsKey during transition. - SnowflakeAzureClient: setSessionlessProxyForAzure import swapped from JDBC HttpUtil to JdbcHttpUtil. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ap callers, clean up FQN refs Replicate JDBC's HttpUtil as JdbcHttpUtil (renamed to avoid collision with ingest's utils.HttpUtil). Swap all callers to use replicated REST infrastructure. Clean up all FQN JDBC references. New files: - JdbcHttpUtil.java — verbatim replication of JDBC's HttpUtil - SnowflakeMutableProxyRoutePlanner.java — proxy routing for HttpUtil - AttributeEnhancingHttpRequestRetryHandler.java — headers customizer - AwsSdkGCPSigner.java — GCS virtual-style access signer Changes: - RestRequest: swap HttpUtil FQN → JdbcHttpUtil - TelemetryClient: swap HttpUtil → JdbcHttpUtil - SnowflakeGCSClient: swap HttpUtil/RestRequest → JdbcHttpUtil/RestRequest - SnowflakeAzureClient: swap setSessionlessProxyForAzure → JdbcHttpUtil - StorageClientUtil: fix convertProxy exception type, fix throwNoSpaceLeft - Remove all FQN SnowflakeSQLException from throws (~47 occurrences) - Remove all FQN HttpClientSettingsKey/HttpProtocol/OCSPMode - Swap AwsSdkGCPSigner to ingest version Result: ZERO net.snowflake.client references in production code (only comments documenting source URLs remain). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change snowflake-jdbc-thin scope to test in pom.xml (used only by TestUtils.java for IT result verification) - Remove JDBC shade relocation rules from Maven Shade plugin JDBC is no longer shipped in the SDK jar. Zero net.snowflake.client code references in production code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ec062e6 to
802a139
Compare
This was referenced Apr 6, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verbatim replication of JDBC HTTP retry infrastructure (~3100 lines):
RestRequest(1265 lines) — HTTP request execution with retry logicHttpExecutingContext(306 lines) — HTTP request execution stateHttpExecutingContextBuilder(280 lines) — builder for HttpExecutingContextRetryContextManager(86 lines) — retry callback registrationRetryContext(41 lines) — retry state holderDecorrelatedJitterBackoff(33 lines) — jitter backoff algorithmURLUtil(74 lines) — URL validation and request ID extractionSFOCSPException(36 lines) — OCSP exceptionOCSPErrorCode(20 lines) — OCSP error code enumThrowingBiFunction(9 lines) — functional interfaceSnowflakeUseDPoPNonceException(17 lines) — DPoP nonce exceptionRemaining JDBC FQN references (to be resolved when HttpUtil is replicated):
net.snowflake.client.core.HttpUtil— 4 call sites in RestRequestnet.snowflake.client.core.SessionUtil.isNewRetryStrategyRequest— 1 call siteTest plan
mvn compiler:compilepasses🤖 Generated with Claude Code